<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2d旋转</title>
    <style>
        div{
            width: 400px;
            height: 400px;
            background: linear-gradient(white 50%, black 50%);
            border: 1px solid gray;
            border-radius: 50%;
            transition: 5s;
        }
        div:hover{
            transform: rotate(1080deg);
        }
        div::before{
            content: "";
            width: 200px;
            height: 200px;
            display: block;
            position: relative;
            left: 0px;
            top: 100px;
            background: radial-gradient(white 10%, black 10%);
            border-radius: 50%;
        }
        div::after{
            content: "";
            width: 200px;
            height: 200px;
            display: block;
            position: relative;
            left: 200px;
            top: -100px;
            background: radial-gradient(black 10%, white 10%);
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div></div>
</body>